package com.lovo.es.Entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;



@Data
@Document(indexName = "news_index")
public class NewEntity {

    @Id
    @Field(type = FieldType.Keyword)  // FieldType.Keyword  不不做拆分
    private String NewsId;
    @Field(type = FieldType.Keyword)  // FieldType.Keyword  不不做拆分
    private String title;
    @Field(type = FieldType.Text)
    private String info;
    @Field(type = FieldType.Keyword)  // FieldType.Keyword  不不做拆分
    private String creatDate;
    @Field(type = FieldType.Keyword)  // FieldType.Keyword  不不做拆分
    private int nums;

}
